package com.moon.game.constants;

/**
 * 常量表
 * 
 * @author Ranger
 *
 */
public class Constants {
	
	//**********************proxy***************************
	public static final int SECURITY_PLACE = 1;// 安全验证位置
	public static final int SID_PLACE = 2;// sid位置
	public static final int PARAMETER_PLACE = 3;// 参数位置
	public static final int OID_PLACE = 4;// pid位置
	
	// NPC ID table
	public static final int LAIR_YARD_ID = 2; // 孵化庄园
	public static final int MONEY_BUSINESSMAN_ID = 4; // 碎银商人ID
	public static final int PET_YARD_ID = 5; // 碎银商人ID
	//**********************proxy***************************
	
	// 超时标记
	public static final int REQ_NO_RETURN = -1;// 请求不返回
	public static final int TIMEOUT_RETURN = 0; // 超时直接返回
	public static final int TIMEOUT_RE_CONNECT = 1; // 超时后重新连接
	public static final int TIMEOUT_IGNORE = 2; // 忽略超时,直接下个状态的代码
	
	// 队列告警值
	public static final int QUEUE_WARNNING = 100; // 队列超过100就告警
	
	// 服务端协议标记
	public static final String PAR_PB_MESSAGE = "PBMessage"; // 服务器之间协议名
	
	// 游戏展示和实际倍数
	public static final int GAME_MULTIPLE = 10000;// 如果展示持久为30，表示实际为30 * 10000，展示向下取整
	
	// 请求状态
	public static final String STATUS_SUCC = "succ"; // 请求成功
	public static final String STATUS_FAIL = "fail"; // 请求失败
	
	// 日志配置
	public static final String LOG_LOGIN = "LOGIN"; //登录日志
	public static final String LOG_RESET = "RESET"; //重置日志
	public static final String LOG_FLOW = "FLOW"; //流水日志
	public static final String LOG_PROFILE = "PROFILE"; //人物日志
	
	// 统计使用,游戏内不能有其它变量名和这个相同
	public static final String FLOW_MONEY = "flow_money";
	public static final String FLOW_GOLD = "flow_gold";
	public static final String FLOW_EXP = "flow_exp";
	public static final String FLOW_HP = "flow_hp";
	public static final String FLOW_MP = "flow_mp";
	public static final String FLOW_ROOM = "flow_room";
	public static final String FLOW_LEVEL = "flow_level";
	public static final String FLOW_BURDEN = "flow_burden";
	public static final String FLOW_IS_ADMIN = "flow_is_admin";
	
	// Memcached最大连接数
	public static final int APP_MEMCACH_CONNECT_SIZE = 40;
	public static final int PROXY_MEMCACH_CONNECT_SIZE = 40;
	
	// 人物状态
	public static final int STATUS_OFFLINE = 0; // 离线
	public static final int STATUS_ONLINE = 1; // 在线
	public static final int STATUS_KICKOUT = 2; // 封号
	
	// regex.config配置文件路径
	public static final String REGEX_FILE = "regex.config";
	
	// 输出页面方式
	public static final int SHOW_WML = 0;
	public static final int SHOW_JSON = 1;
	
	// 各类时间配置
	// 秒单位区
	public static final int TIME_LOGOUT = 15 * 60; // 15分钟清理为操作玩家
	public static final int MAKE_OUT_OF_DATA = 15 * 60; // 15分钟书签过期
	public static final int CHAT_PUBLIC_DEADLINE = 1 * 24 * 60 * 60; // 1天公聊消息过期
	public static final int CHAT_WORLD_DEADLINE = 3 * 24 * 60 * 60; // 3天世界消息过期
	public static final int CHAT_PRIVATE_DEADLINE = 7 * 24 * 60 * 60; // 7天私聊消息过期
	public static final int COMMON_FREASH_TIME = 6 * 60 * 60;//凡兽孵化塔冷却时间【6小时】
	public static final int IMMORTAL_FREASH_TIME = 3 * 60 * 60;//仙兽孵化塔冷却时间【3小时】
	public static final int GOD_FREASH_TIME = 1 * 60 * 60;//神兽孵化塔冷却时间【1小时】
	public static final int PSYCHEDELIC_COMMON_ANIMAL_TIME = 12 * 3600;//一次强行迷幻（留住）凡兽增加的驻足时间【12小时】
	public static final int PSYCHEDELIC_IMMORTAL_ANIMAL_TIME = 9 * 3600;//一次强行迷幻（留住）仙兽增加的驻足时间【9小时】
	public static final int PSYCHEDELIC_GOD_ANIMAL_TIME = 6 * 3600;//一次强行迷幻（留住）神兽增加的驻足时间【6小时】
	public static final int RENT_LAIR_DEFAULT_TIME = 5 * 3600;//默认出租时间
	public static final int ONCE_RENEWAL_ADDED_TIME = 5 * 3600;//续租一次增加的时间
	
	
	
	//聊天
	public static final int CHAT_WORLD = 0;//世界类型
	public static final int CHAT_PUBLIC = 1;//公聊类型
	public static final int CHAT_PRIVATE = 2;//私聊类型
	public static final int CHAT_WORLD_ACT = 3;//世界动态类型
	public static final int CHAT_PRIVATE_ACT = 4;//私聊动态类型
	public static final String CHAT_PUBLIC_KEY = "chat_pub_";//公聊key
	public static final String CHAT_WORLD_KEY = "chat_world";//世界key
	public static final String CHAT_WORLD_ACT_KEY = "chat_world_act";//世界动态key
	public static final String CHAT_PRIVATE_KEY = "chat_pri_";//私聊key
	public static final String CHAT_PRIVATE_ACT_KEY = "chat_pri_act_";//私聊动态key
	public static final int CHAT_PUBLIC_NUM = 30;//公聊保存数量
	public static final int CHAT_PRIVATE_NUM = 30;//私聊保存数量
	public static final int CHAT_WORLD_NUM = 30;//世界保存数量
	public static final int CHAT_ACT_WORLD_NUM = 30;//世界动态保存数量
	public static final int CHAT_ACT_PRIVATE_NUM = 30;//私聊动态保存数量
	public static final String REPAIR_LAIR = "TA_RL";//修复动态类型
	
	//保存道具
	public static final int ADD_ITEM_SUCC = 1;//保存道具成功
	public static final int ADD_ITEM_NO_BURDEN = 2;//负重不够增加道具失败 
	public static final int ADD_ITEM_FAIL = 3;//保存道具异常
	public static final int ADD_ITEM_NO_ROOM = 4;//空间不够
	
	//删除道具
	public static final int DEL_ITEM_LACK = 5;//不存在此道具
	public static final int DEL_ITEM_NOT_ENOUGH = 6;//数量不够
	public static final int DEL_ITEM_SUCC = 7;//删除道具成功
	public static final int DEL_ITEM_FAIL = 8;//删除道具异常
	
	//战斗状态
	public static final int FIGHT_NORMAL = 0;//战斗结果正常
	public static final int FIGHT_MONSTER_SNATCHED = 1;//战斗怪物已经被其他人夺走
	public static final int FIGHT_ERR_LOCATION = 2;//战斗位置参数错误
	public static final int FIGHT_NO_MONSTER = 3;//怪物已经不存在
	public static final int MONSTER_DROP_BASE = 10000;//怪物掉落物品概率基数
	public static final int MONEY_DROP_BASE = 1000;//怪物掉落碎银概率基数
	
	//道具
	public static final int PAGE_SIZE = 10;//请求分页尺寸
	public static final int ITEM_OTHER_TYPE = 0;//其他道具类型
	public static final int ITEM_EGG_TYPE = 2; // 兽蛋道具类型
	public static final int PLAYER_ITEM_TYPE = 1; // 装备道具类型
	public static final int ONCE_USE_ITEM_MAX_NUM = 100; // 单次能使用的道具的最大数量
	public static final int COMMON_ITEM_TYPE = 0; // 普通道具类型
	public static final int MONEY_ITEM_TYPE = 1; // 碎银道具类型
	public static final int GOLD_ITEM_TYPE = 2; // 金币道具类型
	
	
	//等级
	public static int PLAYER_MAX_LEVEL = 45;//目前开放的最大等级
	
	//主城
	public static final int MAIN_CITY = 3000;//主城ID
	
	//孵化塔
	public static final int MAX_TOWER_NUM = 3;//个人孵化塔最大数量
	public static final int COMMON_ANIMAL_LAIR_PRICE = 500;//凡兽孵化塔价格[碎银]
	public static final int IMMORTAL_ANIMAL_LAIR_PRICE = 50;//仙兽孵化塔价格[金币]
	public static final int GOD_ANIMAL_LAIR_PRICE = 200;//神兽孵化塔价格[金币]
	public static final int CALL_ANIMAL_PRICE = 20;//召唤珍兽价格[金币]
	public static final int PSYCHEDELIC_ANIMAL_PRICE = 50;//迷幻（留住）珍兽价格[金币]
	public static final int INCUBATION_PRICE = 100;//孵化价格[碎银]
	public static final int DESTORY_LAIR_PRICE = 200;//摧毁孵化塔价格[碎银]
	public static final int MIN_CREATE_LAIR_LEVEL = 30;//修筑孵化塔的最小等级
	//===========下面的概率孵化塔等阶累加上前面的等阶为基数===============
	public static final int CALL_COMMON_ANIMAL_PRO = 1855;//凡兽被召唤到的概率
	public static final int IMMORTAL_TOWER_CALL_IMMORTAL_ANIMAL_PRO = 5;//仙兽塔上仙兽被召唤到的概率【5/1860】
	public static final int GOD_TOWER_CALL_IMMORTAL_ANIMAL_PRO = 140;//神兽塔上仙兽被召唤到的概率【140/2000】
	public static final int CALL_GOD_ANIMAL_PRO = 5;//神兽被召唤到的概率【5/2000】
	
	public static final int DEFAULT_PET_NUM = 1;//数量
	public static final int MAX_PET_YARD_CAPACITY = 5;//个人宠物最大数量
	public static final int ANIMAL_ERODE = 100000;//孵化侵蚀
	public static final float NATRUE_ERODE = 2;//自然侵蚀系数
	public static final int EXTAND_PRICE = 30;//扩充宠物院价格
	public static final int RENT_LAIR_MIN_INCU_TIMES = 10;//出租孵化塔成功孵化最低次数要求
	public static final int RENT_LAIR_MIN_ENDURE = 800000;//出租孵化塔最低持久标准【满持久的80%】
	public static final int SEE_LAIR_MIN_ENDURE = 200000;//出租孵化塔可以被孵化的最低标准【满持久的20%】
	public static final String RENT_LAIR_EKY = "rent_key";//出租孵化塔key
	public static final int SYS_RENT_LAIR_CAPACITY = 50;//出租孵化塔系统容量
	
	public static final int MAX_RENT_PRICE = 999;//玩家出租孵化塔定价最大值
	public static final int BASE_RANT_AGAIN_PRICE = 50;//续租基数 【50金币】
	
	
	//公告
	public static final String NOTICE_KEY = "notice";//公告键值
	
	//任务
	public static final int REFRESH_MISSION_PRICE = 50;//刷为完成任务价格
	public static final int MAIN_MISSION_TYPE = 1;//主线任务类型
	public static final int DAILY_MISSION_TYPE = 0;//日常任务类型
	
	
	//item ID table List
	public static final int SMALL_HORN_ID = 1172; // 小喇叭ID
	public static final int TALISMAN_SPEAKER_ID = 1173; // 传音符ID
	public static final int NEW_GIFT_ID = 3000; // 新手礼包
	public static final int DAY_GIFT_ID = 3001; // 每日登录礼包
	
}
